package it.cn.demo;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test1 {

    public static void main(String[] args) {

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext-rabbitmq-producer.xml");

        RabbitTemplate template = (RabbitTemplate)context.getBean("rabbitTemplate");

        template.convertAndSend("","queue.test","直接模式测试");

        context.close();


    }
}
